package v1

import (
	"meta-self/internal/model/input/clientin"
	"meta-self/internal/model/input/form"

	"github.com/gogf/gf/v2/frame/g"
)

// CalcPriceReq 计算卡密价格
type CalcPriceReq struct {
	g.Meta `path:"/calcPrice" method:"post" tags:"卡密管理" summary:"计算卡密价格"`
	clientin.LicenseKeyCalcPriceInp
}

type CalcPriceRes struct {
	*clientin.LicenseKeyCalcPriceModel
}

// CreateOrderReq 创建卡密订单
type CreateOrderReq struct {
	g.Meta `path:"/createOrder" method:"post" tags:"卡密管理" summary:"创建卡密订单"`
	clientin.LicenseKeyCreateOrderInp
}

type CreateOrderRes struct {
	*clientin.LicenseKeyCreateOrderModel
}

// ViewReq 获取卡密详情
type ViewReq struct {
	g.Meta `path:"/view" method:"get" tags:"卡密管理" summary:"获取卡密详情"`
	clientin.LicenseKeyViewInp
}

type ViewRes struct {
	*clientin.LicenseKeyViewModel
}

// ListReq 获取卡密列表
type ListReq struct {
	g.Meta `path:"/list" method:"get" tags:"卡密管理" summary:"获取卡密列表"`
	clientin.LicenseKeyListInp
}

type ListRes struct {
	form.PageRes
	List []*clientin.LicenseKeyListModel `json:"list" dc:"数据列表"`
}

// HistoryListReq 获取卡密历史记录列表
type HistoryListReq struct {
	g.Meta `path:"/historyList" method:"get" tags:"卡密管理" summary:"获取卡密历史记录列表"`
	clientin.LicenseKeyHistoryListInp
}

type HistoryListRes struct {
	form.PageRes
	List []*clientin.LicenseKeyHistoryListModel `json:"list" dc:"数据列表"`
}

// ApplyRefundReq 申请卡密退款
type ApplyRefundReq struct {
	g.Meta `path:"/applyRefund" method:"post" tags:"卡密管理" summary:"申请卡密退款"`
	clientin.LicenseKeyApplyRefundInp
}

type ApplyRefundRes struct {
	*clientin.LicenseKeyApplyRefundModel
}
